import service from '@/utils/request'

export const getServiceList = (params) => { 
    return new Promise((resolve,reject)=>{
      service.post('/service/getServiceList',params)
      .then(res=>{
        resolve(res) 
      })
    })
}

export const deleteService = (params) => { 
    return new Promise((resolve,reject)=>{
      service.post('/service/deleteService',params)
      .then(res=>{
        resolve(res) 
      })
    })
}

export const saveService = (params) => { 
    return new Promise((resolve,reject)=>{
      service.post('/service/saveService',params)
      .then(res=>{
        resolve(res) 
      })
    })
}

export const getServiceOrderList = (params) => { 
    return new Promise((resolve,reject)=>{
      service.post('/service/getServiceOrderList',params)
      .then(res=>{
        resolve(res) 
      })
    })
}

export const getServiceAccompanyOrderList = (params) => { 
    return new Promise((resolve,reject)=>{
      service.post('/service/getServiceAccompanyOrderList',params)
      .then(res=>{
        resolve(res) 
      })
    })
}

export const getServiceAidOrderList = (params) => { 
    return new Promise((resolve,reject)=>{
      service.post('/service/getServiceAidOrderList',params)
      .then(res=>{
        resolve(res) 
      })
    })
}

export const confirmServiceOrder = (params) => { 
  return new Promise((resolve,reject)=>{
    service.post('/service/confirmServiceOrder',params)
    .then(res=>{
      resolve(res) 
    })
  })
}

export const confirmServiceAccompanyOrder = (params) => { 
  return new Promise((resolve,reject)=>{
    service.post('/service/confirmServiceAccompanyOrder',params)
    .then(res=>{
      resolve(res) 
    })
  })
}

export const sendServiceAidOrder = (params) => {  // 互助派单
  return new Promise((resolve,reject)=>{
    service.post('/service/sendServiceAidOrder',params)
    .then(res=>{
      resolve(res) 
    })
  })
}

export const verifyServiceAidOrder = (params) => { 
  return new Promise((resolve,reject)=>{
    service.post('/service/verifyServiceAidOrder',params)
    .then(res=>{
      resolve(res) 
    })
  })
}

export const checkServiceOrderPay = (params) => { 
  return new Promise((resolve,reject)=>{
    service.post('/service/checkServiceOrderPay',params)
    .then(res=>{
      resolve(res) 
    })
  })
}
